Field
The teachings in accordance with the exemplary embodiments of this present disclosure generally relate to a PLC data log module, and more particularly to a PLC data log module with backup function configured to stably store a log data in an external memory under an unstable power state or even when the power is suddenly turned off or reset.
Background
Automation facilities at a traditional industrial site include mechanical devices such as a relay and the like. There is a difficulty in replacing wirings, each at a time, of an inner circuit in the automation facilities in order to change functions of the automation facilities configured with mechanical devices. In order solve the difficulties, a programmable logic controller (PLC) is typically employed.
In general, the PLC functions like a computer, where the PLC receives a signal coming from the facilities and processes according to programmed contents inside the PLC, and outputs the processed signal to the facilities. That is, that a PLC operation is smooth means that automation facilities inside a factory operate efficiently. Thus, a continued monitoring of PLC operation is required.
The PLC is largely controlled in an unmanned manner, and therefore, ex post facto measures must be taken to solve an abnormal operation if it is generated. A series of operations may be monitored or a log data of past history may be stored to check if and how the abnormal operation has been generated.
A conventional PLC data log module stores a relevant device value along with time when a condition set by a user is met, and log data stored in the data log module is stored in a separate memory such as SD card. Meantime, a PLC data log module is used in industrial sites, where a power source is frequently turned off or reset due to unexpected reasons to generate unsmooth storage of log data. In case of conventional technology, a backup FAT (File Allocation Table) area is additionally designated in a memory of the data log module to cope with the problem of the power being turned off, but this conventional method cannot be a solution because there is a limit in data backup when an error occurs in a DIR (Directory Entry) area.
The problems caused by generation of errors for each area inside a memory of the data log module may be enumerated as shown in the following Table 1, where ‘0’ indicates a normal case, while ‘X’ shows an abnormal case where an error is generated.
TABLE 1DataFATDIRareaareaareaProblematic phenomenon1◯◯◯Data normally stored2◯◯Xgeneration of another file having a sizedifferent from that of what is stored(e.g.: different size of file actuallystored that has a size different fromthat of what is stored being stored,albeit 1 Mbyte having been stored)File may not be read, or an arbitraryfile may be generated.Stored data uncheckable from SD memory3◯X◯Albeit folder or file list checkable, a caseof file being unreadable may be generated.4◯XXFile or file list being abnormally generatedA case of file being unreadable may begenerated, even if folder or file list canbe checked.A file having a size different from storedsize may be generated, (e.g.: a file ofdifferent size is actually stored, albeit1 Mbyte having been stored)5X◯◯Unnecessary data in a file appears.6X◯XFile or file list being abnormally generatedA file having a size different from storedsize may be generated, (e.g.: a file ofdifferent size is actually stored, albeit1 Mbyte having been stored)7XX◯A file can be checked from SD memory,but cannot be accessed.8XXXA file may not be read, or an arbitraryfile may be generated.
When a memory is damaged in a data log module as discussed above, a problem may be generated where a log data collected for a long time cannot be checked.